package com.phychips.rcp;

/**
 * RcpTypeCTag defines the information related to tag memory.
 */
public class RcpTypeCTag {
    /**
     * Password if target memory bank was password protected. Otherwise, set AP filed to 0x00000000. In the case of kill password, if password set to 0x00000000, ��Kill Type C Tag�� command do not work. The target tag ignores it.
     */
    public long password;
    /**
     * Target tag��s EPC length
     */
    public int epc_length;
    /**
     * Target memory bank; RFU (0x00), EPC (0x01), TID (0x02), User (0x03)
     */
    public int memory_bank;
    /**
     * Starting Address word pointer
     */
    public int start_address;
    /**
     * Data Length (Word Count) or Generic command length (Bit Count)
     */
    public int data_length;
    /**
     * Lock mask and action flags. Each is 10 bits and 4-bit zeros (dummy) are padded to the left.
     */
    public int lock_mask;
    /**
     * Recommissioning bits
     */
    public int recom;
    /**
     * Target tag��s EPC
     */
    public byte[] epc;
    /**
     * Data to write or Generic command
     */
    public byte[] data;

    public byte ts;
    public byte rm;

    public RcpTypeCTag(int epc_length, int data_length) {
        this.epc_length = epc_length;
        this.data_length = data_length;

        epc = new byte[epc_length];
        data = new byte[data_length * 4];
    }
}
